<h2><a id=add_new_list href=#>新增词单</a></h2>
<h2>浏览词单</h2>
<table>
    <tr>
    <td>词单名</td>
    <td>词单大小</td>
    <td>进度</td>
    <td>下次复习时间</td>
    <td>操作</td>
    </tr>
<volist name="wordLists" id="vo" >
    <tr>
	<td>{$vo.name}</td>
    <td>{$vo.size}</td>
    <eq name="vo.done" value="0">
        <td>{$vo.progress}</td>
    </eq>
    <eq name="vo.done" value="1">
        <td style="color:#0000FF">已完成</td>
    </eq>
    <eq name="vo.done" value="0">
        <eq name="vo.test" value="1">
            <td style="color:#FF0000">***现在***</td>
        </eq>
        <eq name="vo.test" value="0">
            <td>{$vo.next}</td>
        </eq>
    </eq>
    <eq name="vo.done" value="1">
        <td style="color:#0000FF">***已完成***</td>
    </eq>
    <td><a class=del_list href="<?php echo U('Home-Wordlist/removeList/listID/'.$vo['id']);?>">删除</a></td>
    <td><a class=view_list href="<?php echo U('Home-Wordlist/viewList/listID/'.$vo['id']);?>">浏览</a></td>
	<td><a class=study_list href="<?php echo U("Home-Wordlist/studyList/listID/".$vo["id"]);?>">
        <eq name="vo.done" value="0">
            <eq name="vo.test" value="1">测试!!!</eq>
            <eq name="vo.test" value="0">学习</eq>
        </eq>
        <eq name="vo.done" value="1">复习</eq>
    </a></td>
    <td><label class=hint></label></td>
	</tr>
</volist>
</table>

<script type=text/javascript>
$("#add_new_list").click(function(){
	$("#repo").load("{:U('Home-Wordlibrary/listAllLibrary');}");
});
$(".view_list").click(function(){
    $("#repo").load($(this).attr('href'));
    return false;
});
$(".study_list").click(function(){
    $("#repo").load($(this).attr('href'));
    return false;
});
$(".del_list").click(function(){
    hint = $(this).parent().next().next().next().children();
    hint.text("删除中......");
    $.get($(this).attr('href'), function(str){
        hint.text(str);
        $("#repo").load("{:U('Home-Wordlist/listWordListsByUser');}");
    });
    return false;
});	
</script>
